home *** CD-ROM | disk | FTP | other *** search
- /*$Id: COMScop.h 1.5 1997/05/12 19:13:58 damien Exp $*/
-
- //
- // COM Example of a Scene Operation : stairs
- //
-
- #ifndef __COMSCOP__
- #define __COMSCOP__
-
- #ifndef __I3DEXSCO__
- #include "I3DExScO.h"
- #endif
-
- // define the SceneOp CLSID
-
- // {80DE4680-0ADB-11cf-A4F7-0000E202D5A5}
- DEFINE_GUID(CLSID_SceneOp,0x80de4680,0xadb,0x11cf,0xa4,0xf7,0x0,0x0,0xe2,0x2,0xd5,0xa5);
-
- typedef struct SceneOpData {
- short fNbStep;
- NUM3D fDx;
- NUM3D fDy;
- NUM3D fDz;
- } SceneOpData;
-
-
- // SceneOp Object :
- #undef INTERFACE
- #define INTERFACE SceneOp
- class SceneOp : public I3DExSceneOperation8 {
- public :
- SceneOp();
- ~SceneOp();
-
- // IUnknown Interface :
- STDMETHODIMP QueryInterface(THIS_ REFIID riid, LPVOID* ppvObj);
- STDMETHODIMP_(ULONG) AddRef(THIS);
- STDMETHODIMP_(ULONG) Release(THIS);
-
- // I3DExtension method :
- STDMETHODIMP_(I3DExtension*) Clone(THIS);
- STDMETHODIMP ShellUtilitiesInit(THIS_ IShUtilities* shellUtilities);
-
- // I3DExDataExchanger methods :
- STDMETHODIMP_(ExtensionDataMap*) GetExtensionDataMap(THIS);
- STDMETHODIMP_(void*) GetExtensionDataBuffer(THIS);
- STDMETHODIMP ExtensionDataChanged(THIS);
- STDMETHODIMP HandleEvent(THIS_ ULONG sourceID);
- STDMETHODIMP_(short) GetResID(THIS);
-
- // I3DExSceneOperation methods
- STDMETHODIMP Prepare(THIS_ I3DShScene* scene, I3DShTreeElement* tree, I3DShSelection* selection, long index, long total);
- STDMETHODIMP_(Boolean) DoIt(THIS_ I3DShScene* scene, I3DShTreeElement* tree, I3DShSelection* selection, long index, long total);
-
- // I3DExSceneOperation methods
- STDMETHODIMP Prepare8(THIS_ I3DShScene* scene, I3DShTreeElement* tree, I3DShSelection* selection, long index, long total, Boolean* canUndo);
- STDMETHODIMP_(Boolean) UndoIt(THIS_ I3DShScene* scene, I3DShTreeElement* tree, I3DShSelection* selection, long index, long total);
- STDMETHODIMP_(Boolean) RedoIt(THIS_ I3DShScene* scene, I3DShTreeElement* tree, I3DShSelection* selection, long index, long total);
- private :
- ULONG fCRef; // reference Counter
- SceneOpData fData; // Scene Operation Data
- };
-
-
- #endif
-